
//渲染菜单
function readMenu(menu){
	$('.nav a').removeClass('current');
	$.each($('.nav a'),function(i,n){
		if($.trim(n.text)==menu){
			$(n).addClass('current');
		}
	})
	$('#money').on('input propertychange',function(){
		var ChineseStr = changeMoneyToChinese($('#money').val());
		$('#moneyChinese').text(ChineseStr);
	})
}

//判断手机或PC访问
function browserRedirect() {
    var sUserAgent = navigator.userAgent.toLowerCase();
    var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
    var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
    var bIsMidp = sUserAgent.match(/midp/i) == "midp";
    var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
    var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
    var bIsAndroid = sUserAgent.match(/android/i) == "android";
    var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
    var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
    if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) ){
        return true;
    }
    return false;
}

//点击特效
function clickEffect(obj,e){
	var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善");
	var $i = $("<span/>").text(a[a_idx]);
	a_idx = (a_idx + 1) % a.length;
	var x = e.pageX, y = e.pageY;
	$i.css({"z-index": 99999999,
			"top": y - 20,
			"left": x,
			"position": "absolute",
			"font-weight": "bold",
			"color": "#5f5f5f" });
	obj.append($i);
	$i.animate({ "top": y - 180,
			"opacity": 0 },
			1500,
			function() { $i.remove(); });
}
